<template>
  <h1>El-布局组件</h1>
  <!-- el-row固定了每一行都有24份  :span来控制当前el-col列占24份中的具体份数 -->
  <el-row>
    <el-col :span="6" style="background-color:#f00;">111</el-col>
    <el-col :span="6" style="background-color:#0f0;">111</el-col>
    <el-col :span="6" style="background-color:#00f;">111</el-col>
    <el-col :span="6" style="background-color:#f0f;">111</el-col>
  </el-row>

  <!-- 天沟:其实就是每列自己的左右内间距padding -->
  <el-row :gutter="20">
    <el-col :span="12" style="border: 5px solid #f00;">222</el-col>
    <el-col :span="12" style="border: 5px solid #0ff;">222</el-col>
  </el-row>

  <el-row :gutter="30">
    <el-col :span="8"><img src="imgs/rich.jpg" style="width:100%;"></el-col>
    <el-col :span="8"><img src="imgs/rich.jpg" style="width:100%;"></el-col>
    <el-col :span="8"><img src="imgs/rich.jpg" style="width:100%;"></el-col>

  </el-row>

  <h3>六张图</h3>
  <el-row :gutter="5">
    <el-col :span="4" v-for="i in 6"><img src="imgs/rich.jpg" style="width:100%;"></el-col>

  </el-row>

  <h3>三张图 图片宽度比例1:2:3</h3>
  <el-row :gutter="5">
    <el-col :span="4"><img src="imgs/rich.jpg" style="width:100%;"></el-col>
    <el-col :span="8"><img src="imgs/rich.jpg" style="width:100%;"></el-col>
    <el-col :span="12"><img src="imgs/rich.jpg" style="width:100%;"></el-col>
  </el-row>

  <h3>一共8列,每列显示数字1 2 3 ... 8</h3>
  <el-row>
    <el-col :span="3" style="border: 5px solid #0ff;" v-for="item in 8">{{item}}</el-col>
  </el-row>

  <h3>列偏移 :offset="0" 默认靠左不偏移,写几就向右移动几列</h3>
  <el-row>
    <el-col :span="15" :offset="8"><img src="imgs/rich.jpg" style="width:100%;"></el-col>
  </el-row>

  <h3>列嵌套<</h3>
  <el-row style="border: 5px solid #282c30;">
    <el-col :span="12" style="border: 5px solid #0f0;">111</el-col>
    <el-col :span="12" style="border: 5px solid #f0f;">
      <!-- 嵌套时,一定要把当前元素再重新看作是一个新的el-row,还是24份,再进行分配!  -->
      <el-row>
        <el-col :span="8" style="border: 5px solid #f00;">222</el-col>
        <el-col :span="8" style="border: 5px solid #0ff;">222</el-col>
        <el-col :span="8" style="border: 5px solid #00f;">222</el-col>
      </el-row>
    </el-col>
  </el-row>

  <h2>我的主页</h2>
  <el-row>
    <el-col :span="8">
      <el-menu>
        <el-menu-item index="1">选项1</el-menu-item>
        <el-menu-item index="2">选项2</el-menu-item>
        <el-menu-item index="3">选项3</el-menu-item>
      </el-menu>
    </el-col>
    <el-col :span="16">
      <el-row :gutter="10">
        <el-col :span="8" ><img src="imgs/rich.jpg" style="width:100%;"></el-col>
        <el-col :span="8" ><img src="imgs/rich.jpg" style="width:100%;"></el-col>
        <el-col :span="8" ><img src="imgs/rich.jpg" style="width:100%;"></el-col>
      </el-row>
    </el-col>

  </el-row>
</template>

<script setup>

</script>

<style scoped>

</style>